const Index = (axios, Url) => {
  var Object = {};
  /*  p1:sessionId=>登录保存的sessionid;
      p2:p=>分页*/
  Object.Index = (p) => {
      return axios({
        method: 'get',
        url: Url.Index + '?page=' + p,
      })
    },
    /*  p1:sessionId=>登录保存的sessionid;
    	p2:p=>分页*/
    Object.productList = (p) => {
      return axios({
        method: 'get',
        url: Url.productList + '?page=' + p,
      })
    },
    /*p1:chid=>学生ID，p2:id=>通知ID，p3:type=>通知类型*/
    Object.NoticeDetail = (chid, id, type) => {
      return axios({
        method: 'get',
        url: Url.NoticeDetail + '?chid=' + chid + '&&id=' + id + '&&type=' + type,
      })
    },
    /*p1:chid=>学生ID，p2:id=>通知ID*/
    Object.ParentIsViewNotice = (chid, id, type) => {
      return axios({
        method: 'post',
        url: Url.ParentIsViewNotice,
        data: {
          'chid': chid,
          'id': id,
          'type': type
        }
      })
    },
    /**/
    Object.Order = (id, password) => {
      return axios({
        method: 'post',
        data: {
          'id': id,
          'password': password
        },
        url: Url.Order,
      })
    },
    Object.Product = (type, product_id) => {
      return axios({
        method: 'get',
        url: Url.Product + '?type=' + type + '&&product_id=' + product_id,
      })
    }
  return Object
}
export default Index
